<template>
  <div class="shops">
    <div class="shopcard" v-for="(item, index) in shopitems"
          :key="index"
          @click="getShop(item.id)"
    >
        <a><img :src="item.img_url"></a>
        <div class="right">
          <div class="shoptit">{{item.title}}</div>
          <div class="shopprice">¥ {{item.new_price}}</div>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  name:'Pro',
  data () {
    return {
      shopitems:[]  
    }
  },
  mounted() {
    this.$http.get('/api/shopCar/cngg/ggg/main')
    .then(({data}) => {
        this.shopitems = data.data;
    })
        },
  methods: {
      getShop(id) {
          this.$router.push('/gou/shop/' + id)
      }
  }
}
</script>

<style lang="scss" scoped>
  @import '../../../../../style/shopCar/Pro.scss';
</style>